package cn.edu.hpu.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import cn.edu.hpu.pojo.Deal;
import cn.edu.hpu.service.DealService;


public class DealAction {
	private DealService dealService;
	private List<Deal> dealList;
	private String id;
	private Deal deal;
	
	public String execute(){
		dealList = dealService.findAll();
		return "success";
	}
	
	public String show(){
		deal =dealService.findById(id);
		return "success";
	}
	
	
	
	
	//set 
	@Autowired
	public void setDealService(DealService dealService) {
		this.dealService = dealService;
	}



	public List<Deal> getDealList() {
		return dealList;
	}


	public void setDealList(List<Deal> dealList) {
		this.dealList = dealList;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Deal getDeal() {
		return deal;
	}

	public void setDeal(Deal deal) {
		this.deal = deal;
	}
	
	
	
	
	
}
